<?php

namespace app\modules\frontend\controllers;

use Yii;
use yii\web\Controller;
use app\models\ProductAuth;
use yii\web\Pjax;
use app\models\TraceSystemContent;

class SystemcontentController extends Controller{
     //根据溯源体系的ID将项目体系的记录找到

     public function actionIndex($id)
     {
         $this->layout = 'product';


         echo "hello";
         $sql = "select * from shbb_trace_system_content where Trace_type_id=$id"; //在项目类型表中找出属于该体系的所有记录

         $models = TraceSystemContent::findBySql($sql)->all();

         //var_dump($models);

        return $this->render('index', ['models' => $models]); //将数据源传给index视图*/
     }


}